﻿Public Class clsChamado
    Inherits clsConexao
    Private fCondicao As String = ""
    Private fTipo As Byte, fStatus As Byte, fRevisar As Byte, fPendencia As Byte, fAtendida As Byte, fVersao As Byte, fAtualizar As Byte, fSistema As Byte, fProcessamento As Byte, fAjuda As Byte, fPrioridade As Byte, fPendencia_Cli As Byte
    Private fContato As String = "", fProblema As String = "", fSolucao As String = "", fHora As String = "", fInterno As String = "", fGerencia As String = "", fMatricula As String = "", fBloqueado As String = "", fResponsavel As String = ""
    Private fCodigo As Integer, fLoja As Integer, fTecnico As Integer, fTela As Integer, fTecnico2 As Integer, fTecnicosol As Integer, fCobrancas As Integer
    Private fTempo_Estimado As Double
    Private fData As Date, fD_Solucao As Date, fH_Solucao As Date, fAlteracao As Date, fD_Versao As Date, fData_Prevista_Solucao As Date
    Public Property Codigo() As Integer
        Get
            Return fCodigo
        End Get
        Set(ByVal value As Integer)
            fCodigo = value
        End Set
    End Property
    Public Property Tipo() As Byte
        Get
            Return fTipo
        End Get
        Set(ByVal value As Byte)
            fTipo = value
        End Set
    End Property
    Public Property Loja() As Integer
        Get
            Return fLoja
        End Get
        Set(ByVal value As Integer)
            fLoja = value
        End Set
    End Property
    Public Property Tecnico() As Integer
        Get
            Return fTecnico
        End Get
        Set(ByVal value As Integer)
            fTecnico = value
        End Set
    End Property
    Public Property Data() As Date
        Get
            Return fData
        End Get
        Set(ByVal value As Date)
            fData = value
        End Set
    End Property
    Public Property Contato() As String
        Get
            Return fContato
        End Get
        Set(ByVal value As String)
            fContato = value
        End Set
    End Property
    Public Property Tela() As Integer
        Get
            Return fTela
        End Get
        Set(ByVal value As Integer)
            fTela = value
        End Set
    End Property
    Public Property Status() As Byte
        Get
            Return fStatus
        End Get
        Set(ByVal value As Byte)
            fStatus = value
        End Set
    End Property
    Public Property Problema() As String
        Get
            Return fProblema
        End Get
        Set(ByVal value As String)
            fProblema = value
        End Set
    End Property
    Public Property Solucao() As String
        Get
            Return fSolucao
        End Get
        Set(ByVal value As String)
            fSolucao = value
        End Set
    End Property
    Public Property Hora() As String
        Get
            Return fHora
        End Get
        Set(ByVal value As String)
            fHora = value
        End Set
    End Property
    Public Property Tecnico2() As Integer
        Get
            Return fTecnico2
        End Get
        Set(ByVal value As Integer)
            fTecnico2 = value
        End Set
    End Property
    Public Property D_Solucao() As Date
        Get
            Return fD_Solucao
        End Get
        Set(ByVal value As Date)
            fD_Solucao = value
        End Set
    End Property
    Public Property H_Solucao() As Date
        Get
            Return fH_Solucao
        End Get
        Set(ByVal value As Date)
            fH_Solucao = value
        End Set
    End Property
    Public Property Revisar() As Byte
        Get
            Return fRevisar
        End Get
        Set(ByVal value As Byte)
            fRevisar = value
        End Set
    End Property
    Public Property Pendencia() As Byte
        Get
            Return fPendencia
        End Get
        Set(ByVal value As Byte)
            fPendencia = value
        End Set
    End Property
    Public Property Interno() As String
        Get
            Return fInterno
        End Get
        Set(ByVal value As String)
            fInterno = value
        End Set
    End Property
    Public Property Tecnicosol() As Integer
        Get
            Return fTecnicosol
        End Get
        Set(ByVal value As Integer)
            fTecnicosol = value
        End Set
    End Property
    Public Property Atendida() As Byte
        Get
            Return fAtendida
        End Get
        Set(ByVal value As Byte)
            fAtendida = value
        End Set
    End Property
    Public Property Cobrancas() As Integer
        Get
            Return fCobrancas
        End Get
        Set(ByVal value As Integer)
            fCobrancas = value
        End Set
    End Property
    Public Property Gerencia() As String
        Get
            Return fGerencia
        End Get
        Set(ByVal value As String)
            fGerencia = value
        End Set
    End Property
    Public Property Versao() As Byte
        Get
            Return fVersao
        End Get
        Set(ByVal value As Byte)
            fVersao = value
        End Set
    End Property
    Public Property Atualizar() As Byte
        Get
            Return fAtualizar
        End Get
        Set(ByVal value As Byte)
            fAtualizar = value
        End Set
    End Property
    Public Property Alteracao() As Date
        Get
            Return fAlteracao
        End Get
        Set(ByVal value As Date)
            fAlteracao = value
        End Set
    End Property
    Public Property Sistema() As Byte
        Get
            Return fSistema
        End Get
        Set(ByVal value As Byte)
            fSistema = value
        End Set
    End Property
    Public Property Processamento() As Byte
        Get
            Return fProcessamento
        End Get
        Set(ByVal value As Byte)
            fProcessamento = value
        End Set
    End Property
    Public Property Matricula() As String
        Get
            Return fMatricula
        End Get
        Set(ByVal value As String)
            fMatricula = value
        End Set
    End Property
    Public Property Ajuda() As Byte
        Get
            Return fAjuda
        End Get
        Set(ByVal value As Byte)
            fAjuda = value
        End Set
    End Property
    Public Property Bloqueado() As String
        Get
            Return fBloqueado
        End Get
        Set(ByVal value As String)
            fBloqueado = value
        End Set
    End Property
    Public Property Prioridade() As Byte
        Get
            Return fPrioridade
        End Get
        Set(ByVal value As Byte)
            fPrioridade = value
        End Set
    End Property
    Public Property D_Versao() As Date
        Get
            Return fD_Versao
        End Get
        Set(ByVal value As Date)
            fD_Versao = value
        End Set
    End Property
    Public Property Pendencia_Cli() As Byte
        Get
            Return fPendencia_Cli
        End Get
        Set(ByVal value As Byte)
            fPendencia_Cli = value
        End Set
    End Property
    Public Property Responsavel() As String
        Get
            Return fResponsavel
        End Get
        Set(ByVal value As String)
            fResponsavel = value
        End Set
    End Property
    Public Property Data_Prevista_Solucao() As Date
        Get
            Return fData_Prevista_Solucao
        End Get
        Set(ByVal value As Date)
            fData_Prevista_Solucao = value
        End Set
    End Property
    Public Property Tempo_Estimado() As Double
        Get
            Return fTempo_Estimado
        End Get
        Set(ByVal value As Double)
            fTempo_Estimado = value
        End Set
    End Property
    Private Sub clsFilial_ListaCampo(ByVal ParAcao As enuTConexao, ByRef parErro As Boolean) Handles Me.ListaCampo
        fNomeTabela = "CHAMADOS"
        AlimentaCampo("CHA_CODIGO", fCodigo, True)
        AlimentaCampo("CHA_TIPO", fTipo, False)
        AlimentaCampo("CHA_LOJA", fLoja, False)
        AlimentaCampo("CHA_TECNICO", fTecnico, False)
        AlimentaCampo("CHA_DATA", fData, False)
        AlimentaCampo("CHA_CONTATO", fContato, False)
        AlimentaCampo("CHA_TELA", fTela, False)
        AlimentaCampo("CHA_STATUS", fStatus, False)
        AlimentaCampo("CHA_PROBLEMA", fProblema, False)
        AlimentaCampo("CHA_SOLUCAO", fSolucao, False)
        AlimentaCampo("CHA_HORA", fHora, False)
        AlimentaCampo("CHA_TECNICO2", fTecnico2, False)
        AlimentaCampo("CHA_D_SOLUCAO", fD_Solucao, False)
        AlimentaCampo("CHA_H_SOLUCAO", fH_Solucao, False)
        AlimentaCampo("CHA_REVISAR", fRevisar, False)
        AlimentaCampo("CHA_PENDENCIA", fPendencia, False)
        AlimentaCampo("CHA_INTERNO", fInterno, False)
        AlimentaCampo("CHA_TECNICOSOL", fTecnicosol, False)
        AlimentaCampo("CHA_ATENDIDA", fAtendida, False)
        AlimentaCampo("CHA_COBRANCAS", fCobrancas, False)
        AlimentaCampo("CHA_GERENCIA", fGerencia, False)
        AlimentaCampo("CHA_VERSAO", fVersao, False)
        AlimentaCampo("CHA_ATUALIZAR", fAtualizar, False)
        AlimentaCampo("CHA_ALTERACAO", fAlteracao, False)
        AlimentaCampo("CHA_SISTEMA", fSistema, False)
        AlimentaCampo("CHA_PROCESSAMENTO", fProcessamento, False)
        AlimentaCampo("CHA_MATRICULA", fMatricula, False)
        AlimentaCampo("CHA_AJUDA", fAjuda, False)
        AlimentaCampo("CHA_BLOQUEADO", fBloqueado, False)
        AlimentaCampo("CHA_PRIORIDADE", fPrioridade, False)
        AlimentaCampo("CHA_D_VERSAO", fD_Versao, False)
        AlimentaCampo("CHA_PENDENCIA_CLI", fPendencia_Cli, False)
        AlimentaCampo("CHA_RESPONSAVEL", fResponsavel, False)
        AlimentaCampo("CHA_DATA_PREVISTA_SOLUCAO", fData_Prevista_Solucao, False)
        AlimentaCampo("CHA_TEMPO_ESTIMADO", fTempo_Estimado, False)
        If fCondicao <> "" Then CondicaoSql = fCondicao
    End Sub

End Class
